<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<style type="text/css">
.Hui-aside {
	overflow: inherit !important;
}

.menu li {
	line-height: 30px !important;
	border: 0px !important;
}

.menu {
	padding: 0px 0px !important;
	border: 0px !important;
	background: #EEE !important;
	border-radius: 0px !important;
	width: 100%;
}
</style>
<title>管理员页面</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="/ExamSystem/static/h-ui/css/H-ui.min.css" rel="stylesheet"
	type="text/css" />
<link href="static/h-ui/css/H-ui.admin.css" rel="stylesheet"
	type="text/css" />
<link href="static/h-ui/css/H-ui.css" rel="stylesheet" type="text/css" />
<link href="skin/default/skin.css" rel="stylesheet" type="text/css"
	id="skin" />
<link href="lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet"
	type="text/css" />
<link href="css/mycss.css" rel="stylesheet" type="text/css" />
<link href="css/listcss.css" rel="stylesheet" type="text/css" />
<link href="css/createScale.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<header class="navbar-wrapper">
	<div class="navbar navbar-black">
		<div class="container cl">
			<a class="logo navbar-logo f-l mr-10 hidden-xs" href="javascript:;"
				title="考试系统">考试系统</a> <a
				class="logo navbar-logo f-l mr-10 visible-xs" href="javascript:;"
				title="考试系统">考试系统</a> <span
				class="logo navbar-slogan f-l mr-10 hidden-xs">V1.0</span>
			<nav class="nav navbar-nav f-r nav-collapse">
			<ul class="cl">
				<li><a href="#" title="个人中心">sdfa</a></li>
				<li><span>|</span></li>
				<li><a href="javascript:;" title="退出登陆"><i
						class="Hui-iconfont">&#xe706;</i></a></li>
			</ul>
			</nav>
		</div>
	</div>
	</header>
	<aside class="Hui-aside">
	<div class="menu_dropdown bk_2">
		<dl id="menu-member">
			<dt>
				<i class="Hui-iconfont">&#xe60d;</i> 用户管理<i
					class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
			</dt>
			<dd>
				<ul class="menu">
					<!-- <li><a _href="ManagerListServlet" href="javascript:void(0)">管理员</a></li> -->
					<li><a _href="" href="javascript:void(0)" readonly>学生<i
							class="arrow Hui-iconfont"></i></a>
						<ul class="menu category_box0" id="StudentListServlet">
							
						</ul></li>
				</ul>
			</dd>
		</dl>
		<dl id="menu-scale">
			<dt>
				<i class="Hui-iconfont">&#xe687;</i> 试卷管理<i
					class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
			</dt>
			<dd>
				<ul class='menu'>
					<li><a _href="" href="javascript:void(0)">试卷列表<i
							class="arrow Hui-iconfont"></i></a>
						<ul class="menu category_box1" id="scaleListServlet">
							
						</ul></li>
					<li><a _href="" href="javascript:void(0)">新建试卷<i
							class="arrow Hui-iconfont"></i></a>
						<ul class="menu category_box2" id="manager/createScale.jsp">
							
						</ul></li>
				</ul>
			</dd>
		</dl>
		<dl id="menu-question">
			<dt>
						<i class="Hui-iconfont">&#xe6f3;</i> 试题管理<i
							class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
					</dt>
					<dd>
						<ul class='menu'>
							<li><a
								href="javascript:void(0)">试题列表<i class="arrow Hui-iconfont"></i></a>
								<ul  class="menu category_box3" id="QuestionListServlet">
									
								</ul></li>
							<li><a 
								href="javascript:void(0)">新增试题<i class="arrow Hui-iconfont"></i></a>
								<ul class="menu category_box4" id="0">
									
								</ul></li>
						</ul>
					</dd>
		</dl>

		<dl id="menu-score">
			<dt>
				<i class="Hui-iconfont">&#xe70c;</i> 成绩管理<i
					class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
			</dt>
			<dd>
				<ul>
					<li><a _href="./ScoreListServlet" href="javascript:;">查看成绩</a></li>

				</ul>
			</dd>
		</dl>
		<dl id="menu-category">
			<dt>
				<i class="Hui-iconfont">&#xe689;</i> 考点管理<i
					class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
			</dt>
			<dd>
				<ul>
					<li><a _href="./CategoryListServlet?method=major"
						href="javascript:void(0)">专业列表</a></li>
					<li><a _href="./CategoryListServlet?method=subject"
						href="javascript:void(0)">科目列表</a></li>
					<li><a _href="./CategoryListServlet?method=knowledge"
						href="javascript:void(0)">知识点列表</a></li>
				</ul>
			</dd>
		</dl>
		<div class='interest_small_box'>
			<div class='interest_title'>
				<i class="Hui-iconfont">&#xe60d; </i>趣味游戏<i
					class="Hui-iconfont menu_dropdown-arrow" id='mylogo'>&#xe6d5;</i>
			</div>
		</div>
		<div class='interest_content'>
			<dl id="menu-member">
				<dt>
					<i class="Hui-iconfont">&#xe60d; </i> 用户管理<i
						class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
				</dt>
				<dd>
					<ul>
						<li><a _href="FunGameStudentListServlet"
							href="javascript:void(0)">学生</a></li>
					</ul>
				</dd>
			</dl>
			<dl id="menu-scale">
				<dt>
					<i class="Hui-iconfont">&#xe687;</i> 试卷管理<i
						class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
				</dt>
				<dd>
					<ul class='menu'>
						<li><a  href="javascript:void(0)">试卷列表<i
								class="arrow Hui-iconfont"></i></a>
							<ul class="menu category_box5" id="FunGameScaleListServlet">
								
							</ul></li>
						<li><a href="javascript:void(0)">新建试卷<i
								class="arrow Hui-iconfont"></i></a>
							<ul class="menu category_box6" id="manager/createFunGameScale.jsp">
								
							</ul></li>
					</ul>
				</dd>
			</dl>
			<dl id="menu-question">
				<dt>
					<i class="Hui-iconfont">&#xe6f3;</i> 试题管理<i
						class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>
				</dt>
				<dd>
					<ul class='menu'>
						<li><a
							href="javascript:void(0)">试题列表<i class="arrow Hui-iconfont"></i></a>
							<ul class="menu category_box7" id="FunGameQuestionListServlet">
								
							</ul></li>
						<li><a 
							href="javascript:void(0)">新增试题<i class="arrow Hui-iconfont"></i></a>
							<ul class="menu category_box8" id="manager/insertQuestion.html">
								
							</ul></li>
					</ul>
				</dd>
			</dl>
		</div>

	</div>
	</aside>

	<div class="dislpayArrow">
		<a class="pngfix" href="javascript:void(0);"
			onclick="displaynavbar(this)"></a>
	</div>
	<section class="Hui-article-box overflow-a">
	<div id="content"></div>
	</section>
	<script type="text/javascript" src="./lib/jquery/1.9.1/jquery.js"></script>
	<script type="text/javascript" src="./lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="./static/h-ui/js/H-ui.js"></script>
	<script type="text/javascript" src="./static/h-ui/js/H-ui.admin.js"></script>
	<!-- <script type="text/javascript"
		src="http://static.h-ui.net/h-ui/3.1/js/H-ui.min.js"></script> -->
	<script type="text/javascript"
		src="./lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="./js/myjs.js"></script>
	<script type="text/javascript" src="./js/managerMain.js"></script>


	<script type="text/javascript"
		src="./lib/jquery.validation/1.14.0/jquery.validate.min.js"></script>
	<script type="text/javascript"
		src="./lib/jquery.validation/1.14.0/validate-methods.js"></script>
	<script type="text/javascript"
		src="./lib/jquery.validation/1.14.0/messages_zh.min.js"></script>
	<script type="text/javascript"
		src="./lib/Validform/5.3.2/Validform.min.js"></script>
</body>
<script type="text/javascript">
$.ajax({
	  'url':"GetCategory",
	  'data':"type=true",
	  'success':function(result){
		for(var i=1;i<9;i++){
			$(".category_box"+i).html(result);
			$(".category_box"+i).find(".show").on("click",function(event){
				if($(this).parent().parent().parent().parent().attr("id")==0){
					window.location.href="./manager/insertQuestion.html";
				}
				var event=$(this);
				var parent=$(this).parent().parent().parent().parent();
				$.ajax({
					'url':$(this).parent().parent().parent().parent().attr("id"),
					'success':function(result){
						$("#content").html(result);
						var pro=event.parent().parent().parent().children("a.profession");
						parent.find("#profession").each(function(index){alert($(this));});
						if(parent.attr("class")=="menu category_box1" || parent.attr("class")=="menu category_box3"|| parent.attr("class")=="menu category_box0"){
							$("#sel_major").append("<option name="+pro.attr("value")+">"+pro.attr("value")+"</option>");
							$("#sel_subject").append("<option name="+event.html()+">"+event.html()+"</option>");
							parent.find(".profession").each(function(index){
								if($(this).attr("value")!=pro.attr("value")) 
								$("#sel_major").append("<option name="+$(this).attr("value")+">"+$(this).attr("value")+"</option>");
							});
							event.parent().parent().find(".show").each(function(index){
								if($(this).text()!=event.text()) 
								$("#sel_subject").append("<option name="+$(this).text()+">"+$(this).text()+"</option>");
							});
							$.ajax({
								"data" : "subject="+event.attr("name"),
								"url" : "CategoryDate",
								"type" : "POST",
								"success" : function(result) {
									$("#sel_knowledge option").remove();
									var result1=JSON.parse(result);
									for(var re in result1){
										 $("#sel_knowledge").append("<option name="+result1[re]+">"+result1[re]+"</option>");
									}
								}
							});
							
						}
					}
				});
				
			});
		}
	  	
	  }});
	  $.ajax({
	  'url':"GetCategory",
	  'data':"type=false",
	  'success':function(result){
			$(".category_box0").html(result);
		
			$(".category_box0").find(".show").on("click",function(event){
				$.ajax({
					'url':$(this).parent().parent().attr("id"),
					'success':function(result){
						$("#content").html(result);
					}
				});
				
			});
		
	  	
	  }});
</script>
</html>
